<template>
  <div>
    <div v-if="btnName" class="fixed-bottom">
      <div @click="tarEvent" class="btn-fixed">{{btnName}}
      </div>
      <div v-if="isIpx" class="for-iphonex"></div>
    </div>
    <div
        class="module"
        :style="'height:'+moduleHeight+'rpx'"
      ></div>
  </div>
</template>
 
 <script>
export default {
  data () {
    return {
      isIpx: false
    }
  },
  props: ['btnName', 'tarEvent'],
  computed: {
    moduleHeight () {
      if (!this.isIpx && !this.btnName) {
        return 0
      } else if (!this.isIpx && this.btnName) {
        return 90
      } else if (this.isIpx && !this.btnName) {
        return 68
      } else if (this.isIpx && this.btnName) {
        return 158
      }
    }
  },
  created () {
    this.isIpx = this.globalData.isIpx
  }
}
</script>
 
<style lang='scss' scoped>
.btn-fixed {
  width: 750rpx;
  height: 90rpx;
  line-height: 90rpx;
  text-align: center;
  color: #fff;
  font-size: 38rpx;
  background: #cdb27e;
}
</style>

 